<include file="layout/header" />
<style type="text/css">
    .teamNum{
        height:20px;
        line-height:20px;
        color:#fff;
        font-size:16px;
    }
    .teamNum span{
        display: inline-block;
        padding:6px 10px;
        border-radius:5px;
        background:#f89000;
    }
    #dt_basic tbody tr td{
          vertical-align:middle;
    }
    #dt_basic tbody tr td:last-child{
        text-align: center;
    }
    #dt_basic tbody tr td button{
        display: inline-block;
        margin:0 10px;
        width: 70px;
    }
    #dt_basic tbody tr td b{
        display: inline-block;
        margin:0 10px;
        width: 70px;
    }
</style>
<div id="content">                
    <!-- widget grid -->
    <section id="widget-grid" class="">
    
        <!-- row -->
        <div class="row">
    
            <!-- NEW WIDGET START -->
            <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12 sortable-grid ui-sortable">
    
                <!-- Widget ID (each widget will need unique ID)-->
                <div class="jarviswidget jarviswidget-color-darken jarviswidget-sortable" id="wid-id-0" data-widget-editbutton="false" role="widget">
                    <header role="heading">
                    <div class="jarviswidget-ctrls" role="menu">   </div>
                    <span class="widget-icon"> <i class="fa fa-table"></i> </span>
                    <h2>设备列表</h2>
    
                    <span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span></header>
                        
                    <!-- widget div-->
                    <div role="content">
    
                        <!-- widget edit box -->
                        <div class="jarviswidget-editbox">
                            <!-- This area used as dropdown edit box -->
                        </div>
                        <!-- end widget edit box -->
                        <!-- widget content -->
                        <div class="widget-body no-padding">
                            <div class="widget-body-toolbar">
                                <form action='{{:url("manage/Dev/alarms")}}' method="get">
                                    <label class="select col-xs-1">
                                        <select name="state" class=" form-control">
                                            <option <if condition="$state eq 0">selected</if> value="0">警报状态</option>
                                            <option <if condition="$state eq 1">selected</if>  value="1">已解除</option>
                                            <option <if condition="$state eq 2">selected</if> value="2">持续中</option>
                                        </select>
                                    </label>
                                    <label class="select col-xs-1">
                                        <select name="type" class=" form-control">
                                            <option <if condition="$type eq 0">selected</if> value="0">警报类型</option>
                                            <option <if condition="$type eq 1">selected</if>  value="1">离线警报</option>
                                            <option <if condition="$type eq 2">selected</if> value="2">异常警报</option>
                                        </select>
                                    </label>
                                    <div class="input-group col-xs-6">
                                        <input type="text" name="devid" value="{{$devid}}" placeholder="请输入设备号" class="search form-control">
                                        <div class="input-group-btn">
                                            <button class="btn btn-default btn-primary" type="submit"><i class="fa fa-search"></i>搜索</button>
                                        </div>
                                        <div class="input-group-btn col-xs-3" style="float: right;">
                                            <a href="{{:url('manage/Dev/adev')}}"><button type="button" class="btn btn-default">导出EXECL</button></a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div id="dt_basic_wrapper" class="dataTables_wrapper form-inline" role="grid">
                                <div class="dt-wrapper">
                                    <table id="dt_basic" class="table table-striped table-bordered table-hover dataTable" aria-describedby="dt_basic_info">
                                        <thead>
                                            <tr role="row">
                                                <th>设备号</th>
                                                <th>警报类型</th>
                                                <th>警报状态</th>
                                                <th>警报触发时间</th>
                                                <th>警报结束时间</th>
                                                <th>描述</th>
                                            </tr>
                                        </thead>
                                        <tbody role="alert" aria-live="polite">
                                            <volist name='data' id='vo'>
                                                <tr class="odd">
                                                    <td>{{$vo.guid1}}</td>
                                                    <td>
                                                    	<switch name="$vo['alarm_type']">
                                                            <case value='offline'>离线</case>
                                                            <case value='abnormal'>异常</case>
                                                        </switch>
                                                    </td>
                                                    <td>
                                                    	<switch name="$vo['state']">
                                                            <case value='last'>持续中</case>
                                                            <case value='end'>已解除</case>
                                                        </switch>
                                                     </td>
                                                    <td>{{$vo.st|date="Y-m-d h:m:s",###}}</td>
                                                    <td>{{$vo.et|date="Y-m-d h:m:s",###}}</td>
                                                    <td>{{$vo.reason}}</td>
                                                </tr>
                                            </volist>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="dt-row dt-bottom-row">
                                    <div class="row">
                                        <div class="col-sm-6"></div>
                                        <div class="col-sm-6 text-right">
                                            <div class="dataTables_paginate paging_bootstrap_full">
                                                <ul class="pagination">
                                                    {{$data->render()}}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- end widget content -->
    
                    </div>
                    <!-- end widget div -->
                </div>
            </article>
            <!-- WIDGET END -->
        </div>
        <!-- end row -->
    </section>
    <!-- end widget grid -->
</div>
<include file="layout/footer" />
